package com.vue.vue.controller;
import com.vue.vue.service.IChartService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 图表ribbon调用 http://localhost:8888/api/v1/user/chart/?username=admin
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/user")
public class ChartController {

    @Autowired
    IChartService chartService;

    @ApiOperation("图表ribbon调用")
    @RequestMapping("chart")
    public Object chart(@RequestParam("username") String username){

        //通过service ribbon调用
        return chartService.chartList(username);

    }


}

